# kong:3.9 镜像支持上海时区，使日志时间正确
FROM kong:3.9

USER root

# 配置清华大学镜像源
RUN sed -i 's|http://.*archive.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list && \
    sed -i 's|http://.*security.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list

# 安装时区工具包并设置上海时区
RUN apt-get update && apt-get install -y tzdata curl && \
    ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone && \
    rm -rf /var/lib/apt/lists/*

USER kong